﻿@model Ejercicio_THE_FUTURE.Models.Producto 
@{ 
ViewBag.Title = "Edit"; 
} 
<h2>Editar</h2> 

@using (Html.BeginForm()) { 
@Html.ValidationSummary(true) 

<fieldset> 
<legend>Producto</legend> 

<div class="editor-label"> 
@Html.LabelFor(model => model.nombre) 
</div> 

<div class="editor-field"> 
@Html.EditorFor(model => model.nombre) 
@Html.ValidationMessageFor(model => model.nombre) 
</div> 

<div class="editor-label"> 
@Html.LabelFor(model => model.descripcion) 
</div> 
<div class="editor-field"> 
@Html.TextAreaFor(model => model.descripcion) 
@Html.ValidationMessageFor(model => model.descripcion) 
</div> 

<div class="editor-label"> 
@Html.LabelFor(model => model.modelo) 
</div> 
<div class="editor-field"> 
@Html.TextAreaFor(model => model.modelo) 
@Html.ValidationMessageFor(model => model.modelo) 
</div> 

<div class="editor-label"> 
@Html.LabelFor(model => model.marca) 
</div> 
<div class="editor-field"> 
    @Html.DropDownListFor(
        model => model.marca, 
        new SelectList(new Ejercicio_THE_FUTURE.Models.DatosContext().miMarca.ToList(), "id", "nombre", Model.marca.id)
    )

</div> 

<div class="editor-label"> 
@Html.LabelFor(model => model.precio) 
</div> 
<div class="editor-field"> 
@Html.TextAreaFor(model => model.precio) 
@Html.ValidationMessageFor(model => model.precio) 
</div> 

 @*<div class="editor-label"> 
    @Html.LabelFor(model => model.url) 
</div>
    <div class="editor-field"> 
   @Html.TextAreaFor(model => model.url) 
  @Html.ValidationMessageFor(model => model.url) 
 </div> *@
<p> 
<input type="submit" value="Guardar cambios" /> 
</p> 
</fieldset> 
} 

@section Scripts { 
@Scripts.Render("~/bundles/jqueryval") 
}


